package com.example.javaeespringioc.demos;

import java.util.List;

public class demo1 {
    public static void main(String[] args) {
        int size = 100;
        Bottom bottom = new Bottom(size);
        Framework framework = new Framework(bottom);
        Car car = new Car(framework);
    }
    static class Car{
        private Framework framework;
        public Car(Framework framework){
            this.framework = framework;
            System.out.println("初始化car");
        }
    }

    static class Framework{
        private Bottom bottom;
        public Framework(Bottom bottom){
            this.bottom = bottom;
            System.out.println("初始化framework");
        }
    }

    static class Bottom{
        private int size;
        public Bottom(int size){
            System.out.println("初始化bottom");
        }
    }
}
